/*
 * ChatAboutBox.java
 */
package chat;

import java.awt.Point;
import java.util.logging.Level;
import java.util.logging.Logger;

import java.awt.Color;
import java.awt.Font;
import java.io.File;
import javax.swing.JColorChooser;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.StyleConstants;
import org.jdesktop.application.Action;

public class ChatBox extends javax.swing.JDialog {

    private ClientClient mClientClient;
    private ClientServer mClientServer;
    private ServerClient mServerClient;
    private String mMyUid;
    private String mMyNick;
    private String mOtherNick;
    public String mSavePath;

    public ChatBox(java.awt.Frame parent, String myUid, ServerClient serverClient, ClientClient clientClient, ClientServer clientServer) {
        super(parent);
        initComponents();

        tp_Messages.setEditable(false);        //更改一下界面 宁
        ep_InputMegBox.requestFocusInWindow();
        sizeItem.setSelectedIndex(2);
        ep_InputMegBox.setFont(new Font("宋体", Font.PLAIN, 12));

        getRootPane().setDefaultButton(closeButton);
        mMyUid = myUid;
        mServerClient = serverClient;
        mClientClient = clientClient;
        mClientServer = clientServer;

        lblNewFiel.setVisible(false);
        btnSavefile.setVisible(false);
    }

    public void setClientClient(ClientClient clientClient) {
        mClientClient = clientClient;
    }

    @Action
    public void closeAboutBox() {
        dispose();
    }

    public void getMeged(String msg) {
        // tp_Messages.setText(tp_Messages.getText() + "\n" + msg);
        if (!msg.equals("")) {
            setAttr(mOtherNick + ":|#000000|12|0|0");
            setAttr(msg);
        }
    }

    public void getShrinked() {
        Point now = this.getLocation();
        this.setLocation(now.x + 6, now.y + 6);
        try {
            Thread.sleep(80);
        } catch (InterruptedException ex) {
            Logger.getLogger(ChatBox.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.setLocation(now.x, now.y);
    }

    public void setOtherNick(String nick) {
        lbl_OtherNick.setText(nick);
        mOtherNick = nick;
    }

    public void setMyNick(String nick) {
        lbl_MyNick.setText(nick);
        mMyNick = nick;
    }

    private void echo(String str) {
        System.out.println("In ChatBox echo: " + str);
    }

    public void setMsg(String msg) {
        //  tp_Messages.setText(msg);
        if (msg.equals("")) {
            tp_Messages.setText("会话开始!\n");
        } else {
            setAttr(mOtherNick + ":|#000000|12|0|1");
            setAttr(msg);
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        closeButton = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tp_Messages = new javax.swing.JTextPane();
        jScrollPane2 = new javax.swing.JScrollPane();
        ep_InputMegBox = new javax.swing.JEditorPane();
        lbl_OtherNick = new javax.swing.JLabel();
        lbl_MyNick = new javax.swing.JLabel();
        btnSend = new javax.swing.JButton();
        btnStrink = new javax.swing.JButton();
        BItem = new javax.swing.JButton();
        IItem = new javax.swing.JButton();
        colorItem = new javax.swing.JButton();
        typeItem = new javax.swing.JComboBox();
        sizeItem = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        btnFile = new javax.swing.JButton();
        lblNewFiel = new javax.swing.JLabel();
        btnSavefile = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(chat.ChatApp.class).getContext().getResourceMap(ChatBox.class);
        setTitle(resourceMap.getString("title")); // NOI18N
        setModal(true);
        setName("aboutBox"); // NOI18N
        setResizable(false);

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(chat.ChatApp.class).getContext().getActionMap(ChatBox.class, this);
        closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N
        closeButton.setName("closeButton"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        tp_Messages.setName("tp_Messages"); // NOI18N
        jScrollPane1.setViewportView(tp_Messages);

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        ep_InputMegBox.setName("ep_InputMegBox"); // NOI18N
        jScrollPane2.setViewportView(ep_InputMegBox);

        lbl_OtherNick.setText(resourceMap.getString("lbl_OtherNick.text")); // NOI18N
        lbl_OtherNick.setName("lbl_OtherNick"); // NOI18N

        lbl_MyNick.setText(resourceMap.getString("lbl_MyNick.text")); // NOI18N
        lbl_MyNick.setName("lbl_MyNick"); // NOI18N

        btnSend.setText(resourceMap.getString("btnSend.text")); // NOI18N
        btnSend.setName("btnSend"); // NOI18N
        btnSend.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnSendMouseClicked(evt);
            }
        });

        btnStrink.setText(resourceMap.getString("btnStrink.text")); // NOI18N
        btnStrink.setName("btnStrink"); // NOI18N
        btnStrink.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnStrinkMouseClicked(evt);
            }
        });

        BItem.setText(resourceMap.getString("BItem.text")); // NOI18N
        BItem.setName("BItem"); // NOI18N
        BItem.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                BItemMouseClicked(evt);
            }
        });

        IItem.setText(resourceMap.getString("IItem.text")); // NOI18N
        IItem.setName("IItem"); // NOI18N
        IItem.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                IItemMouseClicked(evt);
            }
        });

        colorItem.setText(resourceMap.getString("colorItem.text")); // NOI18N
        colorItem.setName("colorItem"); // NOI18N
        colorItem.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                colorItemMouseClicked(evt);
            }
        });

        typeItem.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "宋体", "黑体", "雅黑" }));
        typeItem.setName("typeItem"); // NOI18N
        typeItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                typeItemActionPerformed(evt);
            }
        });

        sizeItem.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "16", "14", "12", "10", "8" }));
        sizeItem.setName("sizeItem"); // NOI18N
        sizeItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sizeItemActionPerformed(evt);
            }
        });

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        btnFile.setText(resourceMap.getString("btnFile.text")); // NOI18N
        btnFile.setName("btnFile"); // NOI18N
        btnFile.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnFileMouseClicked(evt);
            }
        });

        lblNewFiel.setText(resourceMap.getString("lblNewFiel.text")); // NOI18N
        lblNewFiel.setName("lblNewFiel"); // NOI18N

        btnSavefile.setText(resourceMap.getString("btnSavefile.text")); // NOI18N
        btnSavefile.setName("btnSavefile"); // NOI18N
        btnSavefile.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnSavefileMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(btnSend)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnStrink)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnFile)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 83, Short.MAX_VALUE)
                                .addComponent(closeButton))
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel1))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbl_OtherNick)
                                    .addComponent(lbl_MyNick)))
                            .addComponent(lblNewFiel)
                            .addComponent(btnSavefile)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(typeItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(sizeItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(colorItem)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(BItem)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(IItem)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbl_OtherNick)
                            .addComponent(jLabel1))
                        .addGap(153, 153, 153)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(lbl_MyNick))
                        .addGap(34, 34, 34)
                        .addComponent(lblNewFiel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnSavefile))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(typeItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(sizeItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(colorItem)
                            .addComponent(BItem)
                            .addComponent(IItem))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(closeButton)
                    .addComponent(btnSend)
                    .addComponent(btnStrink)
                    .addComponent(btnFile))
                .addGap(49, 49, 49))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnSendMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSendMouseClicked
//        String text = ep_InputMegBox.getText();
//        tp_Messages.setText(tp_Messages.getText() + "\n" + text);
//        echo(mMyUid);
//        mClientClient.sendMsg(mMyUid, text);
//        ep_InputMegBox.setText("");
        String text = ep_InputMegBox.getText();
        ep_InputMegBox.setText("");
        //打包机制
        if (!text.equals("")) {
            String str = new String();
            Color color = ep_InputMegBox.getForeground();
            String R = Integer.toHexString(color.getRed());
            R = R.length() < 2 ? ('0' + R) : R; //color转string
            String B = Integer.toHexString(color.getBlue());
            B = B.length() < 2 ? ('0' + B) : B;
            String G = Integer.toHexString(color.getGreen());
            G = G.length() < 2 ? ('0' + G) : G;
            str = '#' + R + G + B;
            text += "|" + str;

            Font f = ep_InputMegBox.getFont(); //字号
            text += "|" + f.getSize();
            if (f.isBold()) {      //字体样式
                if (f.isItalic()) {
                    text += "|" + 3;
                } else {
                    text += "|" + 1;
                }
            } else if (f.isItalic()) {
                text += "|" + 2;
            } else {
                text += "|" + 0;
            }

            if (f.getFontName().toString().equals("宋体")) {
                text += "|" + 1;
            } //字体外观
            else if (f.getFontName().toString().equals("黑体")) {
                text += "|" + 2;
            } else if (f.getFontName().toString().equals("微软雅黑")) {
                text += "|" + 3;
            } else {
                text += "|" + 0;
            }
            //解包机制 插入一行字

            setAttr(mMyNick + ":|#000000|12|0|0"); //自己昵称
            setAttr(text);//复文本

            echo(mMyUid);
            mClientClient.sendMsg(mMyUid, text);

        }
    }//GEN-LAST:event_btnSendMouseClicked

    private void btnStrinkMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnStrinkMouseClicked
        mClientClient.sendShrink(mMyUid);
    }//GEN-LAST:event_btnStrinkMouseClicked

    private void BItemMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_BItemMouseClicked
        Font nowf = ep_InputMegBox.getFont();    //两次点击更改为平常情况？
        if (nowf.isBold()) {
            if (nowf.isItalic()) {
                ep_InputMegBox.setFont(new Font(nowf.getFontName(), Font.ITALIC, nowf.getSize()));
            } else {
                ep_InputMegBox.setFont(new Font(nowf.getFontName(), Font.PLAIN, nowf.getSize()));
            }
        } else if (nowf.isItalic()) {
            ep_InputMegBox.setFont(new Font(nowf.getFontName(), Font.BOLD + Font.ITALIC, nowf.getSize()));
        } else {
            ep_InputMegBox.setFont(new Font(nowf.getFontName(), Font.BOLD, nowf.getSize()));
        }
    }//GEN-LAST:event_BItemMouseClicked

    private void IItemMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_IItemMouseClicked
        Font nowf = ep_InputMegBox.getFont();
        if (nowf.isItalic()) {
            if (nowf.isBold()) {
                ep_InputMegBox.setFont(new Font(nowf.getFontName(), Font.BOLD, nowf.getSize()));
            } else {
                ep_InputMegBox.setFont(new Font(nowf.getFontName(), Font.PLAIN, nowf.getSize()));
            }
        } else if (nowf.isBold()) {
            ep_InputMegBox.setFont(new Font(nowf.getFontName(), Font.BOLD + Font.ITALIC, nowf.getSize()));
        } else {
            ep_InputMegBox.setFont(new Font(nowf.getFontName(), Font.ITALIC, nowf.getSize()));
        }
    }//GEN-LAST:event_IItemMouseClicked

    private void colorItemMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_colorItemMouseClicked
        Color fcolor = ep_InputMegBox.getForeground();
        Color colorStyle = JColorChooser.showDialog(this, "选择字体颜色", fcolor);
        colorItem.setForeground(colorStyle);
        ep_InputMegBox.setForeground(colorStyle);
    }//GEN-LAST:event_colorItemMouseClicked

    private void sizeItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sizeItemActionPerformed

        Font nowf = ep_InputMegBox.getFont();

        int i = sizeItem.getSelectedIndex();
        int ssize;
        switch (i) {
            case 0:
                ssize = 16;
                break;
            case 1:
                ssize = 14;
                break;
            case 2:
                ssize = 12;
                break;
            case 3:
                ssize = 10;
                break;
            case 4:
                ssize = 8;
                break;
            default:
                ssize = 12;
                break;
        }

        ep_InputMegBox.setFont(new Font(nowf.getPSName(), nowf.getStyle(), ssize));
    }//GEN-LAST:event_sizeItemActionPerformed

    private void typeItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_typeItemActionPerformed
        Font nowf = ep_InputMegBox.getFont();

        int i = typeItem.getSelectedIndex();
        String sstyle;
        switch (i) {
            case 0:
                ep_InputMegBox.setFont(new Font("宋体", nowf.getStyle(), nowf.getSize()));
                break;
            case 1:
                ep_InputMegBox.setFont(new Font("黑体", nowf.getStyle(), nowf.getSize()));
                break;
            case 2:
                ep_InputMegBox.setFont(new Font("微软雅黑", nowf.getStyle(), nowf.getSize()));
                break;

            default:
                ep_InputMegBox.setFont(new Font("宋体", nowf.getStyle(), nowf.getSize()));
                break;
        }
    }//GEN-LAST:event_typeItemActionPerformed
    public String mSelectedPath;
    public String mSelectedFileName;

    private void btnFileMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnFileMouseClicked
        JPanel panel = new JPanel();
        JFileChooser jfchooser = new JFileChooser();
        jfchooser.setApproveButtonText("选择文件");
        jfchooser.setDialogTitle("选择文件");
        jfchooser.showOpenDialog(panel);
        File file = jfchooser.getSelectedFile();
        mSelectedFileName = file.getName();
        mSelectedPath = file.getPath();
        mClientClient.startSendFile(mMyUid);
//        echo(mMyUid);
//        mClientClient.sendfile(mMyUid, filename, path);
    }//GEN-LAST:event_btnFileMouseClicked

    public void getFiled() {
        lblNewFiel.setVisible(true);
        btnSavefile.setVisible(true);
    }

    public void fileSendSuccessed() {
        lblNewFiel.setVisible(false);
        btnSavefile.setVisible(false);
    }

    private void btnSavefileMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSavefileMouseClicked
        JPanel panel = new JPanel();
        JFileChooser jfchooser = new JFileChooser();
        jfchooser.setApproveButtonText("选择文件");
        jfchooser.setDialogTitle("选择文件");
        jfchooser.showOpenDialog(panel);
        File file = jfchooser.getSelectedFile();
        mSavePath = file.getPath();

        mClientServer.confrimSendFile();
    }//GEN-LAST:event_btnSavefileMouseClicked
    public void insert(String str, SimpleAttributeSet attrSet) {
        Document doc = tp_Messages.getDocument();
        str = str + "\n ";
        try {
            doc.insertString(doc.getLength(), str, attrSet);
        } catch (BadLocationException e) {
            System.out.println("BadLocationException:   " + e);
        }
    }

    public void setAttr(String str) {
        SimpleAttributeSet attrSet = new SimpleAttributeSet();

        String a[] = str.split("\\|"); //分开

        int col = Integer.parseInt(a[1].substring(1), 16);
        int siz = Integer.parseInt(a[2]);

        String fac = new String();               //字体转换
        int facint = Integer.parseInt(a[4]);
        if (facint == 1) {
            fac = "宋体";
        } else if (facint == 2) {
            fac = "黑体";
        } else if (facint == 3) {
            fac = "微软雅黑";
        } else {
            fac = "宋体";
        }

        String style = new String();               //字体的形式转换
        int styint = Integer.parseInt(a[3]);

        StyleConstants.setForeground(attrSet, new Color(col));//颜色
        StyleConstants.setFontSize(attrSet, siz);//字号
        if (styint == 1 || styint == 3) {
            StyleConstants.setBold(attrSet, true);//形式(黑斜)
        }
        if (styint == 2 || styint == 3) {
            StyleConstants.setItalic(attrSet, true);
        }
        StyleConstants.setFontFamily(attrSet, fac);//字体
        insert(a[0], attrSet);
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BItem;
    private javax.swing.JButton IItem;
    private javax.swing.JButton btnFile;
    private javax.swing.JButton btnSavefile;
    private javax.swing.JButton btnSend;
    private javax.swing.JButton btnStrink;
    private javax.swing.JButton closeButton;
    private javax.swing.JButton colorItem;
    private javax.swing.JEditorPane ep_InputMegBox;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JLabel lblNewFiel;
    private javax.swing.JLabel lbl_MyNick;
    private javax.swing.JLabel lbl_OtherNick;
    private javax.swing.JComboBox sizeItem;
    private javax.swing.JTextPane tp_Messages;
    private javax.swing.JComboBox typeItem;
    // End of variables declaration//GEN-END:variables
}
